<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Register</title>
    </h:head>
    <h:body>
        <ui:composition template="/Template/newTemplate.xhtml">
            <ui:define name="content">
                <h:form>
                    <table>
                        <tr>
                            <td><h:outputText value="Username"></h:outputText></td>
                            <td><h:inputText value="#{registerBean.username}"></h:inputText></td>
                        </tr>
                        <tr>
                            <td><h:outputText value="Password"></h:outputText></td>
                            <td><h:inputSecret value="#{registerBean.password}"></h:inputSecret></td>
                        </tr>
                        <tr>
                            <td><h:outputText value="Confirm Password"></h:outputText></td>
                            <td><h:inputSecret value="#{registerBean.confirmPassword}"></h:inputSecret></td>
                        </tr>
                        <tr>
                            <td><h:outputText value="First Name"></h:outputText></td>
                            <td><h:inputText value="#{registerBean.firstName}"></h:inputText></td>
                        </tr>
                        <tr>
                            <td><h:outputText value="Last Name"></h:outputText></td>
                            <td><h:inputText value="#{registerBean.surName}"></h:inputText></td>
                        </tr>
                        <tr>
                            <td><h:outputText value="Address"></h:outputText></td>
                            <td><h:inputText value="#{registerBean.address}"></h:inputText></td>
                        </tr>
                        <tr>
                            <td><h:outputText value="Zipcode"></h:outputText></td>
                            <td><h:inputText value="#{registerBean.zipcode}"></h:inputText></td>
                        </tr>
                        <tr>
                            <td><h:outputText value="City"></h:outputText></td>
                            <td><h:inputText value="#{registerBean.city}"></h:inputText></td>
                        </tr>
                        <tr>
                            <td><h:outputText value="Country"></h:outputText></td>
                            <td><h:inputText value="#{registerBean.country}"></h:inputText></td>
                        </tr>
                        <tr>
                            <td><h:outputText value="Email"></h:outputText></td>
                            <td><h:inputText value="#{registerBean.email}"></h:inputText></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td align="right"><h:commandButton action="#{registerBean.register(registerBean.username, registerBean.password,
                                               registerBean.confirmPassword, registerBean.firstName, registerBean.surName, registerBean.address,
                                               registerBean.zipcode, registerBean.city, registerBean.country, registerBean.email)}" value="Register"></h:commandButton></td>
                        </tr>
                    </table>
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>